//
//  ListLoadingFooterView.m
//  Policeman
//
//  Created by 李振宁 on 16/1/4.
//  Copyright © 2016年 LiZhenning. All rights reserved.
//

#import "ListLoadingFooterView.h"

@implementation ListLoadingFooterView

+ (instancetype)initLoadingFooter
{
    ListLoadingFooterView *view = [[ListLoadingFooterView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 90)];
    
    return view;
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];

    if (self)
    {
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake((self.frame.size.width - 90) * 0.5, (self.frame.size.height - 30) * 0.5, 90, 30)];
        [label setText:@"正在加载更多..."];
        [label setFont:[UIFont systemFontOfSize:12]];
        [label setTextAlignment:NSTextAlignmentCenter];
        [self addSubview:label];
        
        UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
        [indicator startAnimating];
        [indicator setFrame:CGRectMake(label.frame.origin.x - 30, (self.frame.size.height - 30) * 0.5, 30, 30)];
        [self addSubview:indicator];

    }
    
    
    return self;
}



@end
